<%@ page import="net.mysoft.framework.util.ResourceUtil,net.mysoft.framework.model.SessionInfo"%>
<%@ page language="java" pageEncoding="UTF-8"%>

<%@ page import="java.util.*" %>
<!-- jsp:include page="/common/CommonStaticJavascript.jsp" /-->
<%
	SessionInfo sessionInfo = (SessionInfo)session.getAttribute(ResourceUtil.getSessionInfoName());
    String strUserCode =sessionInfo.getUserId();

	//RtdCompanyDto rtCompanyDto = (RtdCompanyDto) request.getAttribute("RtdCompanyDto");  
	//if (rtCompanyDto == null) {
	//	rtCompanyDto = new RtdCompanyDto();
	//}
	//String[] strComCode = rtCompanyDto.getComCode().split(",");
	//request.setAttribute("user",UserDto);
	//RfFlowTemplateNodeDto rfFlowTemplateNodeDto = new RfFlowTemplateNodeDto();
	String strStatus = (String)session.getAttribute("Status");
	int intStatus = 1;
	if("02".equals(strStatus)){
	intStatus=2;
	}else{
	intStatus=1;
	}

 %>


<HTML>
<HEAD> 
<TITLE> Step Properties </TITLE>
<link rel="stylesheet" type="text/css" href="inc/style.css">
<link rel="stylesheet" type="text/css" href="inc/webTab/webtab.css">
<script language=jscript src="inc/function.js"></script>
<script language=jscript src="inc/shiftlang.js"></script>
<script language=jscript src="inc/webTab/webTab.js"></script>

<style> 
body { 
	background-color: buttonface;
	scroll: no;
	margin: 7px, 0px, 0px, 7px;
	border: none;
	overflow: hidden;	

}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
function iniWindow(){ 
   var opener = window.dialogArguments;
   var url = opener.dialogURL;
   var stepId = url.indexOf('?stepid=')<0?'':url.slice(url.indexOf('?stepid=')+8,url.length);
   
   try{
     if(opener.LANG!='') shiftLanguage(opener.LANG,"stepdialog");

     var FlowXML = opener.document.all.FlowXML;	 
     if(stepId==''){
     	iniActionDialog(FlowXML);
	   atNewStep();
	 }else{
	   if(FlowXML.value!=''){
	     iniActionDialog(FlowXML,stepId);
	      atEditStep(FlowXML,stepId);
	   }else{
	     alert('打开流程属性对话框时出错！');
		 window.close();  
	   }	   
	 }  
   }catch(e){
     alert('打开步骤属性对话框时出错！');
	 window.close();
   }
}
 
function iniActionDialog(FlowXML,stepId){
	
   xmlDoc = new ActiveXObject('MSXML2.DOMDocument');
   xmlDoc.async = false;
   xmlDoc.loadXML(FlowXML.value);
   var xmlRoot = xmlDoc.documentElement;
   var Steps = xmlRoot.getElementsByTagName("Steps").item(0);
   var from = document.all.Ftn_ReturnTo;
   addSelectOption(from,"--退回到上一步--",'','');
   for ( var i = 0;i < Steps.childNodes.length;i++ ) {
      Step = Steps.childNodes.item(i);
	  id = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("id");
	  var stype = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("stepType");
	  text = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("text");
	  if(stepId!=id){
	  	addSelectOption(from,text,id,id);
	  }
   } 
}

  function isValid(e){
     var newValue = e.value;
     var value=/^[0-9]*[1-9][0-9]*$/;	
     if(newValue.match(value)){
       return true;
       }else{
       alert("请输入大于0的整数！");
  	   e.value ="";
       return false;  
       }
     }

 function okOnClick(){
   var status = fm.Status.value;
   if(status == 2){
   issueData(fm.RoleCode.value,fm.ComCode.value,fm.userCode.value);  
   var d = document.getElementById("testDiv");  
   }else{
   var opener = window.dialogArguments;
   var url = opener.dialogURL;
   var stepId = url.indexOf('?stepid=')<0?'':url.slice(url.indexOf('?stepid=')+8,url.length);
   try{ 
     var FlowXML = opener.document.all.FlowXML;	  
	 xml = getStepXML(FlowXML,stepId);
	 if(xml!='') {
	   FlowXML.value = xml;
	   window.close();
	 } 
	 
   }catch(e){
     alert('关闭步骤属性对话框时出错！!');
	 window.close();
    }  
   } 
}
	var xmlHttp;
		
		   function createXMLHttpRequest() {
				if (window.ActiveXObject) {
					xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
				} else if (window.XMLHttpRequest) {
					xmlHttp = new XMLHttpRequest();
				}
			}
			
			function issueData(roleCode,comCode,userCode) {
				createXMLHttpRequest();					
				var saveURL = "/risk/flow/BeforeIssue.jsp?RoleCode=" + roleCode+"&ComCode="+comCode+"&UserCode="+userCode+ "&tm=" + new Date() ;				
				xmlHttp.open("GET",saveURL,true);				
				xmlHttp.onreadystatechange = callback;				
				xmlHttp.send(null);
								
			}    
    					
           function callback() { 
				if (xmlHttp.readyState == 4) {
					if (xmlHttp.status == 200) {	
					   if(xmlHttp.responseText == 1){	
					   var d = document.getElementById("testDiv");
                        d.innerHTML =xmlHttp.responseText; 	
                        alert("此步骤设置成功！"); 
                        //
                        var opener = window.dialogArguments;
                        var url = opener.dialogURL;  
                        var stepId = url.indexOf('?stepid=')<0?'':url.slice(url.indexOf('?stepid=')+8,url.length);
                        try{ 
                            var FlowXML = opener.document.all.FlowXML;	  
	                        xml = getStepXML(FlowXML,stepId);
	                        if(xml!='') {
	                        FlowXML.value = xml;
	                        window.close();
	                       } 	 
                           }catch(e){
                            alert('关闭步骤属性对话框时出错！!');
	                        window.close();
                           }                         
                        //                                               			    					   	
						}else if(xmlHttp.responseText == 2){	
						  var d = document.getElementById("testDiv");
                           d.innerHTML =xmlHttp.responseText;                         
                            alert("请检查此步骤接收人设置是否正确！"); 
                            //
                            if(d.innerHTML == 2){
                             return false;
                            }
                            var opener = window.dialogArguments;
                            var url = opener.dialogURL;
                            var stepId = url.indexOf('?stepid=')<0?'':url.slice(url.indexOf('?stepid=')+8,url.length);
                           try{ 
                            var FlowXML = opener.document.all.FlowXML;	  
	                            xml = getStepXML(FlowXML,stepId);
	                           if(xml!='') {
	                           FlowXML.value = xml;	  
                                window.close();
                            	 } 
	                             }catch(e){
                                 alert('关闭步骤属性对话框时出错！!');
                             	 window.close();
                                 }   
                            	//				        
					     }			    					     					     					     				 
					}
				}
			}
function cancelOnClick(){
   window.close();
}
function applyOnClick(){
	var status = fm.Status.value;
   if(status == 2){
   issueData(fm.RoleCode.value,fm.ComCode.value,fm.userCode.value);  
   var d = document.getElementById("testDiv")
   if(d.innerHTML==2 ){
    return false;
   }
   }
   var opener = window.dialogArguments;
   var url = opener.dialogURL;
   var stepId = url.indexOf('?stepid=')<0?'':url.slice(url.indexOf('?stepid=')+8,url.length);

   try{
     var FlowXML = opener.document.all.FlowXML;
	 xml = getStepXML(FlowXML,stepId);	 
	 if(xml!='') {
	   FlowXML.value = xml;
	   btnApply.disabled=true;
	 }
   }catch(e){
     alert('应用步骤属性时出错！');
	 window.close();
   }
}

function atNewStep(){}
function atEditStep(FlowXML,stepId){
  var xmlDoc = new ActiveXObject('MSXML2.DOMDocument');
  xmlDoc.async = false;
  xmlDoc.loadXML(FlowXML.value);
  var xmlRoot = xmlDoc.documentElement;
  var Steps = xmlRoot.getElementsByTagName("Steps").item(0);

  for ( var i = 0;i < Steps.childNodes.length;i++ ) {
    Step = Steps.childNodes.item(i);
	nId = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("id");
	
	if(nId==stepId){
	  var Actions = xmlRoot.getElementsByTagName("Actions").item(0);
	  var pname="";
	  var pc=0;
	 
	  for ( var kk = 0;kk < Actions.childNodes.length;kk++ ) {
        var action = Actions.childNodes.item(kk);
        var cname= action.getElementsByTagName("BaseProperties").item(0).getAttribute("to");
        if(cname==nId){
        pname= action.getElementsByTagName("BaseProperties").item(0).getAttribute("from");
	    pc=1;
	    break;
		}
	  }
	  
	if(pc==1){
	   Actions = xmlRoot.getElementsByTagName("Actions").item(0);
	   //alert(pname);
	   for ( var m = 0;m < Actions.childNodes.length;m++ ) {
	    var an = Actions.childNodes.item(m);
	    var cn= an.getElementsByTagName("BaseProperties").item(0).getAttribute("to");
	    var pId = an.getElementsByTagName("BaseProperties").item(0).getAttribute("from");
       if(cn!=nId&&pname==pId){
	    pc++;
	    //kk=0;
	    break;
		}
	  }
     }
	
	 if(pc==2){
	 // alert(pc);
		//  alert("请将"+pname+"结点的");
	    document.getElementById("branchs").style.display="";
	  //alert(trd);
	  }
	  
	  document.all.StepId.value = stepId;document.all.StepId.disabled=true;
      document.all.StepText.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("text");
      document.all.ComCode.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("comCode");
      if(document.all.ComCode.value =='null'){   
     	document.all.ComCode.value="";
      }
      /*document.all.ComCName.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("comCName");
      if(document.all.ComCName.value=='null'){
      	document.all.ComCName.value = "";
      }*/
      
      document.all.DetractCode.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("detractCode");
      if(document.all.DetractCode.value =='null'){   
      	document.all.DetractCode.value="";
      }   
      document.all.DetractName.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("detractName");
      if(document.all.DetractName.value=='null'){
      	document.all.DetractName.value = "";
      }    
      document.all.userCode.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("userCode");
      if(document.all.userCode.value =='null'){   
     	 document.all.userCode.value="";
      }
      document.all.UserName.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("userName");
      if(document.all.UserName.value=='null'){
     	 document.all.UserName.value = "";
      }
      
      document.all.RoleCode.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("roleCode");
      if(document.all.RoleCode.value =='null'){   
      	document.all.RoleCode.value="";
      }
      document.all.RoleName.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("roleName");
      if(document.all.RoleName.value=='null'){
      	document.all.RoleName.value = ""; 
      }
      document.all.Deadline.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("deadline");
       if(document.all.Deadline.value=='null'){
     	 document.all.Deadline.value = "";
      }
      document.all.RemindInterval.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("remindInterval");
      if(document.all.RemindInterval.value=='null'){
     	 document.all.RemindInterval.value = "";
      }
      setRadioValues(document.all.StepType,Step.getElementsByTagName("BaseProperties").item(0).getAttribute("stepType"));
      document.all.TextList.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("textList");     
      if(document.all.TextList.value == 'null'){
     	 document.all.TextList.value = "";
      }
      document.all.FormUrl.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("formUrl");     
      if(document.all.FormUrl.value == 'null'){
      	document.all.FormUrl.value = "";
      }
      
      document.all.Ftn_UserNum.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("ftn_UserNum");     
      if(document.all.Ftn_UserNum.value == 'null'){
      	document.all.Ftn_UserNum.value = "";
      }
      document.all.Ftn_ReturnTo.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("ftn_ReturnTo");     
      if(document.all.Ftn_ReturnTo.value == 'null'){
      	document.all.Ftn_ReturnTo.value = "";
      }
      
      document.all.Ftn_Class.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("ftn_Class");     
      if(document.all.Ftn_Class.value == 'null'){
      	document.all.Ftn_Class.value = "";
      }
      setRadioValues(document.all.Ftn_MustPass,Step.getElementsByTagName("BaseProperties").item(0).getAttribute("ftn_MustPass"));
 //     document.all.Ftn_StartupDefault.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("ftn_StartupDefault");     
  //    if(document.all.Ftn_StartupDefault.value == 'null'){
 //     	document.all.Ftn_StartupDefault.value = "";
  //    }
      document.all.Ftn_XiangMuJD.value = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("ftn_XiangMuJD");     
      if(document.all.Ftn_XiangMuJD.value == 'null'){
      	document.all.Ftn_XiangMuJD.value = "";
      }
      
      document.all.Width.value = Step.getElementsByTagName("VMLProperties").item(0).getAttribute("width");
      document.all.Height.value = Step.getElementsByTagName("VMLProperties").item(0).getAttribute("height");
      document.all.X.value = Step.getElementsByTagName("VMLProperties").item(0).getAttribute("x");
      document.all.Y.value = Step.getElementsByTagName("VMLProperties").item(0).getAttribute("y");
      document.all.TextWeight.value = Step.getElementsByTagName("VMLProperties").item(0).getAttribute("textWeight");
      document.all.StrokeWeight.value = Step.getElementsByTagName("VMLProperties").item(0).getAttribute("strokeWeight");
	  document.all.StrokeColor.value = Step.getElementsByTagName("VMLProperties").item(0).getAttribute("strokeColor");
	  setRadioGroupValue(document.all.StepStatus,Step.getElementsByTagName("BaseProperties").item(0).getAttribute("stepStatus"));
  
	  break;
	} 
  } 


}

function getStepXML(FlowXML,stepId){
  
  id = document.all.StepId.value;
  text = document.all.StepText.value;
  comCode = document.all.ComCode.value;
  //comCName = document.all.ComCName.value;
  detractCode = document.all.DetractCode.value;
  detractName = document.all.DetractName.value;
  userCode = document.all.userCode.value;
  userName = document.all.UserName.value;
  roleCode = document.all.RoleCode.value;
  roleName = document.all.RoleName.value;
  deadline = document.all.Deadline.value;
  remindInterval = document.all.RemindInterval.value;
  stepType = getRadioGroupValue(document.all.StepType);
  if(id=='') {alert('请先填写步骤编号！');return '';}
  if(text=='') {alert('请先填写步骤名称！');return '';}
  
  width = document.all.Width.value;
  height = document.all.Height.value;  
  x = document.all.X.value;
  y = document.all.Y.value;
  textWeight = document.all.TextWeight.value;
  strokeWeight = document.all.StrokeWeight.value;
  strokeColor = document.all.StrokeColor.value;
 
  stepStatus = getRadioGroupValue(document.all.StepStatus);
  textList = document.all.TextList.value;
  formUrl = document.all.FormUrl.value;
  
  ftn_UserNum = document.all.Ftn_UserNum.value;
  ftn_ReturnTo = getSelectValue(document.all.Ftn_ReturnTo);
  ftn_Class = document.all.Ftn_Class.value;
  ftn_MustPass = getRadioGroupValue(document.all.Ftn_MustPass);
  ftn_XiangMuJD = document.all.Ftn_XiangMuJD.value;
    
  var xml = ""; 
  //生成步骤xml
  xml+= '<Step><BaseProperties id="'+id+'" text="'+text+'" comCode = "'+comCode+'" detractCode = "'+detractCode+'" detractName = "'+detractName+'" userCode = "'+userCode+'" userName = "'+userName+'" roleCode = "'+roleCode+'" roleName = "'+roleName+'"  textList = "'+textList+'"  ftn_Class = "'+ftn_Class+'" ftn_MustPass = "'+ftn_MustPass+'" ftn_XiangMuJD = "'+ftn_XiangMuJD+'" ftn_UserNum = "'+ftn_UserNum+'" ftn_ReturnTo = "'+ftn_ReturnTo+'" formUrl = "'+formUrl+'" stepStatus = "'+stepStatus+'" stepType="'+stepType+'" deadline="'+deadline+'" remindInterval="'+remindInterval+'" />';
  xml+= '<VMLProperties width="'+width+'" height="'+height+'" x="'+x+'" y="'+y+'" textWeight="'+textWeight+'" strokeWeight="'+strokeWeight+'" strokeColor="'+strokeColor+'" zIndex="" />';
  xml+= '<FlowProperties /></Step>';
  var xmlDoc = new ActiveXObject('MSXML2.DOMDocument');
  xmlDoc.async = false;
  xmlDoc.loadXML(FlowXML.value); 
  var xmlRoot = xmlDoc.documentElement;
  var Steps = xmlRoot.getElementsByTagName("Steps").item(0);
  var Actions = xmlRoot.getElementsByTagName("Actions").item(0);
  
  //添加：查找编号冲突的Id
  //修改：查找原来的Id
  for ( var i = 0;i < Steps.childNodes.length;i++ ) { 
  	 
      Step = Steps.childNodes.item(i);
	  nId = Step.getElementsByTagName("BaseProperties").item(0).getAttribute("id");
	  
	  if(nId==id && stepId=='') {
	    alert('新步骤编号已存在！请重新输入！');return '';
	  }
	  if(nId==stepId && stepId!='') {
	    Steps.removeChild(Step);break;
	  } 
 }
 
 //alert(xml);
 
  var xmlDoc2 = new ActiveXObject('MSXML2.DOMDocument');
  xmlDoc2.async = false;
  xmlDoc2.loadXML(xml);     
  Steps.appendChild(xmlDoc2.documentElement); 
  return xmlRoot.xml; 
}
//-->



function openModalDialog(src, width, height, showScroll){   
	window.showModalDialog (src,"","location:No;status:No;help:No;dialogWidth:"+width+";dialogHeight:"+height+";scroll:"+showScroll+";");   
}   
function openWin(src,name,width, height, showScroll){   
	var iTop=(window.screen.height-height)/2; 
	var iLeft=(window.screen.width-width)/2; 
	window.open (src,name,'height='+height+'px,width='+width+'px,top='+iTop+'px,left='+iLeft+'px,toolbar=no,menubar=no,scrollbars='+showScroll+', resizable=no,location=no, status=no') ;  
}

	/**
	* 用户选择界面
	*/
	function userSelect(number,bianHao_inputName,mingCheng_inputName){
		openWin('/dagongcredit/yongHuAction!userSelect2.action?number='+number+'&bianHao_inputName='+bianHao_inputName+'&mingCheng_inputName='+mingCheng_inputName,'','600','500','no');
	}
	function userSelectView(){
		openWin('/ZhongChengLM/yongHuAction!yongHuSelectView.action?userCodes='+document.all.userCode.value,'','600','500','no');
	}
	/**
	* 部门选择界面
	*/
	function zuZhiJGSelect(number,bianHao_inputName,mingCheng_inputName){
		//openWin('/dagongcredit/zuZhiJGAction!zuZhiJGSelect2.action?number='+number+'&bianHao_inputName='+bianHao_inputName+'&mingCheng_inputName='+mingCheng_inputName,'','600','500','no');
		alert("部门选择界面");
	}
	
	/**
	*角色选择界面
	*/
	function roleSelect(number,bianHao_inputName,mingCheng_inputName){
		openWin('/ZhongChengLM/jueSeAction!jueSeSelect.action?number='+number+'&bianHao_inputName='+bianHao_inputName+'&mingCheng_inputName='+mingCheng_inputName,'','600','500','no');
	}
	
</SCRIPT> 

</HEAD>
<form name="fm"  method="post">
<input type="hidden" name="Status" value="<%=intStatus%>"/>
<BODY onload='iniWindow()' onunload=''>
<table border="0" cellpadding="0" cellspacing="0" height=385px>
<thead>
  <tr id="WebTab">
	<td class="selectedtab" id="tab1" onmouseover='hoverTab("tab1")' onclick="switchTab('tab1','contents1');"><span id=tabpage1>基本属性</span></td>
	<td class="tab" id="tab2" onmouseover='hoverTab("tab2")' onclick="switchTab('tab2','contents2');"><span id=tabpage2>图表属性</span></td>	
	<td class="tab" id="tab3" onmouseover='hoverTab("tab3")' onclick="switchTab('tab3','contents3');"><span id=tabpage3>流程属性</span></td>	
	<td class="tabspacer" width=400>&nbsp;</td>	
  </tr>
</thead>
<tbody>
  <tr>
	<td id="contentscell" colspan="5">
<!-- Tab Page 1 Content Begin -->
<div id="testDiv">
</div>
<div class="selectedcontents" id="contents1">
<TABLE border=0 width="100%" height="100%">
<TR valign=top>
	<TD></TD>
	<TD width="100%" valign=top>
	<Fieldset style="border: 1px solid #C0C0C0;">
	<LEGEND align=left style="font-size:9pt;">&nbsp;<span id=tabpage1_1>基本属性</span>&nbsp;</LEGEND>
	<TABLE border=0 width="100%" height="100%" style="font-size:9pt;">	
	<TR valign=top>
		<TD width=5></TD>
		<TD><span id=tabpage1_2>步骤编号</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="StepId" value="newstep" class=txtput onkeyup="strCheck(this);"></TD>
		<TD></TD>
	</TR>
	<TR valign=top>
		<TD></TD>
		<TD><span id=tabpage1_3>步骤名称</span>&nbsp;&nbsp;<textarea NAME="StepText" value="" class=txtput ></textarea></TD>
		<TD></TD>
    </TR>
	<TR valign=top>
		<TD></TD>
		<TD><span id=tabpage1_4>步骤类型</span>&nbsp;&nbsp;<FONT style="font-size:10pt;" COLOR="#919CD0">
			<INPUT TYPE="radio" NAME="StepType" value="BeginStep"  disabled >
			<span id=tabpage1_5 style="{color:#000}">开始步骤</span>&nbsp;
			<INPUT TYPE="radio" NAME="StepType" value="EndStep" >
			<span id=tabpage1_6 style="{color:#000}">结束步骤</span>&nbsp;
			<INPUT TYPE="radio" NAME="StepType" value="NormalStep" checked><span id=tabpage1_7 style="{color:#000}">中间步骤</span>&nbsp;</FONT></TD>
		<TD></TD>
    </TR> 
    <TR valign=top style="{display: 'none'}">
		<TD></TD>
		<TD><span id=tabpage1_8>步骤状态</span>&nbsp;&nbsp;<FONT style="font-size:10pt;" COLOR="#919CD0"><INPUT TYPE="radio" NAME="StepStatus" value="0" checked><span id=tabpage1_9>普通步骤</span>&nbsp;<INPUT TYPE="radio" NAME="StepStatus" value="2" ><span id=tabpage1_10>与聚合步骤</span>&nbsp;<INPUT TYPE="radio" NAME="StepStatus" value="7"  ><span id=tabpage1_11>或聚合步骤</span>&nbsp;<INPUT TYPE="radio" NAME="StepStatus" value="1"  ><span id=tabpage1_12>与分支步骤</span>&nbsp;<INPUT TYPE="radio" NAME="StepStatus" value="6"  ><span id=tabpage1_13>或分支步骤</span>&nbsp;</FONT></TD>
		<TD></TD>
    </TR>
    <TR valign=top id="branchs" style="{display: 'none'}">
	    <input readonly name="DetractCode" type="hidden" >
		<TD></TD>
		<TD><span id=tabpage1_14>分支条件</span>&nbsp;&nbsp;<input type="text" readonly name="DetractName" style="width:400"   onclick="popUserSingleChoice(fm.DetractCode,this)";></TD>
		<TD></TD>
	</TR>   
	<!-- TR valign=top>
		<TD width=2></TD>
		<TD><span id=tabpage1_10>缺省启动</span>&nbsp;&nbsp;
			<INPUT TYPE="radio" NAME="Ftn_StartupDefault" value="1" checked="checked">
			<span id=tabpage1_5 style="{color:#000}">是</span>&nbsp;
			<INPUT TYPE="radio" NAME="Ftn_StartupDefault" value="0">
			<span id=tabpage1_6 style="{color:#000}">否</span>&nbsp;
		<TD></TD>
	 </TR --> 
	 

	 <TR valign=top>
		<TD width=2></TD>
		<TD><span id=tabpage1_10>必须通过此步骤</span>&nbsp;&nbsp;
			<INPUT TYPE="radio" NAME="Ftn_MustPass" value="1" checked="checked">
			<span id=tabpage1_5 style="{color:#000}">是</span>&nbsp;
			<INPUT TYPE="radio" NAME="Ftn_MustPass" value="0">
			<span id=tabpage1_6 style="{color:#000}">否</span>&nbsp;
		<TD></TD>
	 </TR> 
	 <TR valign=top>
		<TD width=2></TD>
		<TD><span id=tabpage1_10>步骤执行人数</span>&nbsp;&nbsp;
			<INPUT TYPE="text" NAME="Ftn_UserNum" value="1" class=txtput>
		<TD></TD>
	 </TR> 
	 <TR valign=top>
		<TD width=2></TD>
		<TD><span id=tabpage1_10>步骤退回设置</span>&nbsp;&nbsp;
			<SELECT NAME="Ftn_ReturnTo" class=txtput></SELECT>
		<TD></TD>
	</TR> 
	 
	<TR valign=top>
		<TD width=2></TD>
		<TD><span id=tabpage1_11>项目阶段</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="Ftn_XiangMuJD" value="" class=txtput></TD>
		<TD></TD>
	 </TR> 
	 <TR valign=top>
		<TD width=2></TD>
		<TD><span id=tabpage1_12>步骤分类</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="Ftn_Class" value="" class=txtput></TD>
		<TD></TD>
	 </TR> 
	<TR height="3">
		<TD></TD>
		<TD></TD>
		<TD></TD>   
	</TR>
	</TABLE>
	</Fieldset>
	</TD>
	<TD>&nbsp;</TD>
</TR>

<TR height="100%">
	<TD></TD><TD></TD><TD></TD>
</TR>
</TABLE>
</div>
<!-- Tab Page 1 Content End -->

<!-- Tab Page 2 Content Begin -->
<div class="contents" id="contents2">
<TABLE border=0 width="100%" height="100%">
<TR valign=top>
	<TD></TD>
	<TD width="100%" valign=top>
	<Fieldset style="border: 1px solid #C0C0C0;">
	<LEGEND align=left style="font-size:9pt;">&nbsp;<span id=tabpage2_1>坐标与大小</span>&nbsp;</LEGEND>
	<TABLE border=0 width="100%" height="100%" style="font-size:9pt;">	
	<TR valign=top>
		<TD width=5></TD>
		<TD><span id=tabpage2_2>图形宽度</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="Width" value="300" class=txtput></TD>
		<TD></TD>
	</TR>
	<TR valign=top>
		<TD></TD>
		<TD><span id=tabpage2_3>图形高度</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="Height" value="160" class=txtput></TD>
		<TD></TD>
    </TR>
	<TR valign=top>
		<TD></TD>
		<TD><span id=tabpage2_4>图形X坐标</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="X" value="400" class=txtput></TD>
		<TD></TD>
    </TR>
	<TR valign=top>
		<TD></TD>
		<TD><span id=tabpage2_5>图形Y坐标</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="Y" value="400" class=txtput></TD>
		<TD></TD>
    </TR>
	<TR height="3">
		<TD></TD>
		<TD></TD>
		<TD></TD>
	</TR>
	</TABLE>
	</Fieldset>
	</TD>
	<TD>&nbsp;</TD>
</TR>

<TR valign=top>
	<TD></TD>
	<TD width="100%" valign=top>
	<Fieldset style="border: 1px solid #C0C0C0;">
	<LEGEND align=left style="font-size:9pt;">&nbsp;<span id=tabpage2_6>步骤样式</span>&nbsp;</LEGEND>
	<TABLE border=0 width="100%" height="100%" style="font-size:9pt;">	
	<TR valign=top>
		<TD width=5></TD>
		<TD><span id=tabpage2_7>文本大小</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="TextWeight" value="" class=txtput></TD>
		<TD></TD>
	</TR>
	<TR valign=top>
		<TD></TD>
		<TD><span id=tabpage2_8>边框粗细</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="StrokeWeight" value="" class=txtput>
		<INPUT TYPE="hidden" NAME="StrokeColor" value="" class=txtput>	
		</TD>
		<TD></TD>
    </TR>
    	
	<TR height="3">
		<TD></TD> 
		<TD></TD>
		<TD></TD>
	</TR> 
	</TABLE>
	</Fieldset>
	</TD>
	<TD>&nbsp;</TD>
</TR>

<TR height="100%">
	<TD></TD><TD></TD><TD></TD>
</TR>
</TABLE>	  
</div>
<!-- Tab Page 2 Content End -->

<!-- Tab Page 3 Content Begin -->
<div class="selectedcontents" id="contents3">
<TABLE border=0 width="100%" height="100%">
<TR valign=top>
	<TD></TD>
	<TD width="100%" valign=top>
	<Fieldset style="border: 1px solid #C0C0C0;">
	<LEGEND align=left style="font-size:9pt;">&nbsp;<span id=tabpage3_1>流程属性</span>&nbsp;</LEGEND>
	<TABLE border=0 width="100%" height="100%" style="font-size:9pt;">	
	<!-- TR valign=top>
		<TD width="5%"></TD>
		<TD><span id=tabpage3_2>接收人</span></TD>
		<TD></TD>
	</TR -->
	<TR valign=top>
		<TD><span id=tabpage3_3>人员</span></TD>
		<TD > 
			<input readonly  name="userCode" id="userCode" type="hidden" value="" >
			<textArea readonly name="UserName" id="UserName"  style="width:400"   rows="5" class="common" onclick="userSelectView()"></textArea></TD><!-- onclick="userSelect(2,'userCode','UserName')" -->
		<TD></TD>
	</TR>     
  
	<TR valign=top style="display:none">
		<TD><span id=tabpage3_4>部门</span></TD>
		<TD>  
			<input readonly name="ComCode" id="ComCode" type="hidden" value="" > 
			<textArea name="ComCName" class="common" id="ComCName" rows="5" style="width:400" readonly onclick="zuZhiJGSelect(2,'ComCode','ComCName')" ></textArea>
		</td>
		<TD></TD>
    </TR>
 
	<TR valign=top>
		<TD><span id=tabpage3_5>角色</span></TD>
	    <TD> 
	    	<input readonly name="RoleCode" id="RoleCode"  type="hidden" value="" >
		     <textArea NAME="RoleName" id="RoleName"  class="common" rows="5" style="width:400" onclick="roleSelect(2,'RoleCode','RoleName')"></textArea>
		</TD>
		<TD></TD>
    </TR> 
    <TR valign=top>
		<TD><span id=tabpage3_3>绑定业务表单</span></TD>
		<TD > 
			<textArea name="FormUrl" style="width:400"   rows="5" class="common" ></textArea></TD>
		<TD></TD>
	</TR> 
	
    <TR valign=top style="display: none">
		<TD width=2></TD>
		<TD><span id=tabpage3_9>绑定文本区域</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="TextList" value="" class=txtput></TD>
		<TD></TD>
	 </TR> 
	 <!-- TR valign=top>
		<TD width=2></TD>
		<TD><span id=tabpage3_10>绑定业务按钮</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="BusiButton" value="" class=txtput></TD>
		<TD></TD>
	 </TR --> 		

	<TR valign=top>
	<TD></TD>
	<TD width="100%" valign=top>
	<Fieldset style="border: 1px solid #C0C0C0;">
	<LEGEND align=left style="font-size:9pt;">&nbsp;<span id=tabpage3_6>催办设置</span>&nbsp;</LEGEND>
	<TABLE border=0 width="100%" height="100%" style="font-size:9pt;">	
	
	<TR valign=top>
		<TD width=2></TD>
		<TD><span id=tabpage3_7>限办时间</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="Deadline" value="" class=txtput onblur="isValid(this)">小时</TD>
		<TD></TD>
	
		<TD width=2></TD>
		<TD><span id=tabpage3_8>提醒间隔</span>&nbsp;&nbsp;<INPUT TYPE="text" NAME="RemindInterval" value="" class=txtput onblur="isValid(this)">小时</TD>
		<TD></TD>
	</TR>
	 <TR height="3">
		<TD></TD>
		<TD></TD>
		<TD></TD>   
	</TR>
	
	</TABLE>
	</Fieldset>
	</TD>
	<TD>&nbsp;</TD>
</TR>
	
	<TR height="3">
		<TD></TD>
		<TD></TD>
		<TD></TD>   
	</TR>
	</TABLE>
	</Fieldset>
	</TD>
	<TD>&nbsp;</TD>

</TR>

<TR height="100%">
	<TD></TD><TD></TD><TD></TD>
</TR>
</TABLE>
</div>
<!-- Tab Page 3 Content End -->



	</td>
  </tr>
</tbody>
</table>

<table cellspacing="1" cellpadding="0" border="0" style="position: absolute; top: 500px; left: 0px;">
	<tr>
		<td width="100%"></td>
		<td><input type=button id="btnOk" class=btn value="确 定" onclick="jscript: okOnClick();">&nbsp;&nbsp;&nbsp;</td>
		<td><input type=button id="btnCancel" class=btn value="取 消" onclick="jscript: cancelOnClick();">&nbsp;&nbsp;&nbsp;</td>
		<td><input type=button id="btnApply" class=btn value="应 用" onclick="jscript: okOnClick();">&nbsp;&nbsp;&nbsp;</td>
	</tr>
</table>
<app:codeInput /></from>
</BODY>
</HTML>
